package org.demo.patten.flyweight;

/**
 * @author zhuj
 * @date 2025/3/22
 * @apiNote
 */
public class ConcreteTreeType implements TreeType {
    private String name;     // 树种名
    private String color;    // 颜色
    private String texture;  // 纹理资源路径
    public ConcreteTreeType(String name, String color, String texture) {
        this.name = name;
        this.color = color;
        this.texture = texture;
    }
    @Override
    public void display(int x, int y) {
        System.out.printf("绘制 [%s] 树，颜色 %s，纹理 %s，位置 (%d, %d)\n",
                name, color, texture, x, y);
    }
}
